package org.winexpress

class CartItem {
    
    // i might not want to store price here because 
    // it will affect the latest price pull so just 
    // call web service to get it... then update to invoice
    int id
//    String itemName
//    String itemPrice    // move selling price to here 
    //int productId - cannot !!!!!!!
    int quantity
    static hasOne = [shoppingCart:ShoppingCart, product:Product]

    static constraints = {
        id(blank:false, unique:true)
        //productId(blank:false)
        quantity(blank:false)
        shoppingCart(blank:false)
    }
}
